<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
</style>
<div ng-if="pagedata.op=='main'" class="fui-page" style="display:block;">
    <div class="fui-content" style="padding-bottom:4rem">
		<div class="fui-tab fui-tab-danger">
			  <a ng-repeat="(k,v) in pagedata.credit_types" ng-class="{'active':pagedata.params.type==k}" ng-click="pagedata.params.type=k;tool.get_list('jy_creditchange/mygoods/getlist/',true);">{{v}}转让</a>
		</div>
		<div style="padding:0.5rem">
		<div class="fui-list-group" style="margin-top:0">
		<div ng-repeat="item in pagedata.list" class="fui-list">
			<div class="fui-list-media">
				<img ng-src="{{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}}" class="round">
			</div>
			<div class="fui-list-inner">
				<div class="row">
				      <div class="row-text" >
					 {{item.title}}({{item.creditnum}}个)
				      </div>
				</div>
				<div class="subtitle">
				    <span><i class="icon icon-paihao0"></i> {{item.usernum}}人</span><span style="margin-left:0.5rem">{{item.updatetimetitle}}</span>
				</div>
				<div class="text" style="font-size:0.75rem">
				    <div class="label label-success">{{item.statustitle}}</div>
					<div ng-click="pagedata.showjia=true;pagedata.item=item" class="jylabel jylabel-success">查看出价</div>
				</div>
			</div>
			<div class="row-remark">
				<div ng-if="item.status==1" ng-click="pagedata.showgou=true;pagedata.item=item" class="jylabel jylabel-red">回购</div>
				<div ng-if="item.status<=1" ng-click="access_json('jy_creditchange/mygoods/edit/id='+item.id)" class="jylabel jylabel-success">编辑</div>
				<div ng-click="post({},'/mygoods/del/','id='+item.id,'','确认删除吗？')" class="jylabel jylabel-red active">删除</div>
			</div>		
		</div>
		</div>
		</div>
		<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
	<div class="fe-floatright-bottom right" style="z-index:103;bottom:180px;">
		<a href="javascript:;" ng-click="access_json('/mygoods/edit/')">
				<i class="icon icon-add"></i>
				<div style="color:#333">发布</div>
		</a>			
	</div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='edit'">
	<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.post,'edit')">提交</a>
	</div>
</div>
<div ng-if="pagedata.showjia" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showjia=false"></i>
			<div style="padding:0.5rem">
			<div class="fui-list-group" style="margin-top:0">
			<div ng-repeat="item in pagedata.item.orders" class="fui-list" style="height: 3.5rem">
				<div class="fui-list-media">
					<img ng-src="{{tomedia(item.member.avatar) ||'../core/resource/images/nopic.jpg'}}" class="round">
				</div>
				<div class="fui-list-inner">
					<div class="row">
						  <div class="row-text" >
						 {{item.member.nickname}}
						  </div>
					</div>
					<div class="subtitle">
						出价：<span class="syscolor">￥{{item.fee}}</span>
					</div>
					<div class="subtitle">
						{{item.createtime}}
					</div>
				</div>
				<div ng-if="pagedata.item.status==1" class="row-remark">
					<div ng-click="post({},'/mygoods/set/','id='+item.id,'','确认达成交易吗？')" class="jylabel jylabel-red active">选择他</div>
				</div>		
			</div>
			</div>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.showgou" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showgou=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 2rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行“转让回购”操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-jifen"  style="font-size:0.8rem"></i>回购获得：</div>
					<div class='fui-cell-info'>{{pagedata.item.goufee}}</div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post({},'/mygoods/gou/id='+pagedata.item.id)">确认回购</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
/*var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
if (browserRule.test(navigator.userAgent)) {
        window.onpageshow = function(event) {
            if (event.persisted) {
                window.location.reload()
            }
        };
}*/
//滚动加载
scope.tool.get_list('jy_creditchange/mygoods/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_creditchange/mygoods/getlist/');
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>